package edu.ynu.se.xiecheng.achitectureclass.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

@Entity
@Getter
@Setter
@Where(clause = "is_deleted = 0")
public class Shop extends LogicEntity {
    @Column
    private String shopId;
    @Column
    private String shopName;
    @Column
    private String address;
    @ManyToOne
    private Business business;
    @OneToMany(mappedBy = "shop")
    private List<ShopItem> ShopItems;
    @OneToMany(mappedBy = "shop")
    private List<Order> orders;

}
